package cloudPayAdmin.admin.service.traffic;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cloudPayAdmin.admin.dbapp.entity.traffic.TPicture;
import cloudPayAdmin.admin.dbapp.repo.traffic.PictureRepo;

@Service
@Transactional
public class PictureService {
	
	@Autowired
	PictureRepo pictureRepo;
	
	@Transactional(readOnly=true)
	public TPicture findById(Long pictureId) {
		return pictureRepo.findOne(pictureId);
	}
	
	public TPicture save(TPicture picture) {
		return pictureRepo.save(picture);
	}
}
